package com.woniuxy.lrz.carlproject.controller.form.formgoods;

import io.swagger.annotations.ApiImplicitParam;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotEmpty;
import javax.validation.constraints.NotNull;
import java.math.BigDecimal;
import java.util.Map;

@Data
@AllArgsConstructor
@NoArgsConstructor
@ApiModel("商品SKU新增或修改，接收前端传递参数")
public class GoodsSkuAOUForm {

    @ApiModelProperty("Skuid")
    private Integer skuId;

    @ApiModelProperty("关联商品id")
    @NotNull(message = "商品ID不能为空")
    private Integer goodId;

    @ApiModelProperty("sku表")
    @NotEmpty(message = "SKU信息不能为空")
    private Map<String,String> skuProperty;

    @ApiModelProperty("价格")
    @NotNull(message = "SKU对应的价格不能为空")
    private BigDecimal skuPrice;
    /**
     * 新增SKU的时候，SKU状态决定商品是否上架
     */
    @ApiModelProperty("状态 ON上架 DOWN 下架")
    @NotBlank(message = "SKU状态不能为空")
    private String skuStatus;
}
